package org.jeecg.modules.demo.membermanagement.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.membermanagement.entity.MemberInfo;
import org.jeecg.modules.demo.membermanagement.entity.MemberManagement;
import org.jeecg.modules.demo.membermanagement.entity.MyMemberInfo;

import java.util.List;
import java.util.Map;

/**
 * @Description: 会员管理
 * @Author: jeecg-boot
 * @Date: 2022-01-14
 * @Version: V1.0
 */
public interface IMemberManagementService extends IService<MemberManagement> {
    /**
     * 根据id查询会员信息
     *
     * @param storeId
     * @param memberId
     * @return
     */
    MemberInfo getMemberinfoById(String storeId, String memberId);

    /**
     * 查询我的客源
     *
     * @param storeId
     * @param stockId
     * @return
     */
    List<MyMemberInfo> getMyMemberList(@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("storeId") String storeId, @Param("stockId") String stockId);

    void updateMemberType(String memberType, String stockId);

    List<MemberManagement> getNotStockMember(@Param("storeId") String storeId);

    void deleteRelationStock(String stockId);

    void updateMemberTypeByStockId(@Param("stockId") String stockId);

    List<Map<String, Object>> listMemberProject(Map<String, Object> map);

    MemberManagement getOneRecord(String storeId, String unionId);

    MemberManagement getOneRecordByUnionId(String storeId, String unionId);

    List<MemberManagement> getRelationsAll(String id, String storeId);

    List<MemberManagement> getRelations(String id, String storeId);

    void updateStockId(String stockId, String id);

    void updateRelationQty(String id, Integer relationQty);

    Integer getRelationsAllQty(String id, String storeId);

}
